package kaka.utils
{
	import flash.xml.XMLDocument;
	import mx.rpc.xml.SimpleXMLDecoder;

	public class XmlUtils
	{
		/**
		 *将XML对象转换成Object对象
		 * @author kaka
		 **/
		public static function xmlToObject(value:XML):Object {
			var xmlStr:String = value.toXMLString();
			var xmlDoc:XMLDocument = new XMLDocument(xmlStr);
			var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true);
			var resultObj:Object = decoder.decodeXML(xmlDoc);
			return resultObj;
		}
	}
}